package com.itqf.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.itqf.serializer.MySerializer;
import lombok.Data;

import java.util.Date;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2021/1/14
 * @Time: 下午4:26
 */
@Data
public class TbItem {

    /**
     *
     title: "小米手机1",
     price: 1001,
     num: null,
     money: "￥2379.83元",
     created: "2021-01-21 10:20:10",
     itemId: 1
     }
     */
    @JSONField(name = "itemId")
    private   long id;

    private  String title;
    //null 不想忽略  默认：null 忽略
    @JSONField(serialzeFeatures = SerializerFeature.WriteMapNullValue)
    private  String sellPoint;//sell_point  -->sellPoint 驼峰映射
    private  long price;
    private  Integer num;
    @JSONField(serializeUsing = MySerializer.class)
    private double money;//1323.232    ￥1323.23元

    //@DateTimeFormat  接日期参数
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date  created;

    private int  version;//版本



}
